import request from '@/utils/request'

// 查询运营管理广告列表
export function listAdvertisement(query) {
    return request({
        url: '/server/advertisement/list',
        method: 'get',
        params: query
    })
}

// 查询运营管理广告详细
export function getAdvertisement(advertisementId) {
    return request({
        url: '/server/advertisement/' + advertisementId,
        method: 'get'
    })
}

// 新增运营管理广告
export function addAdvertisement(data) {
    return request({
        url: '/server/advertisement',
        method: 'post',
        data: data
    })
}

// 修改运营管理广告
export function updateAdvertisement(data) {
    return request({
        url: '/server/advertisement',
        method: 'put',
        data: data
    })
}

// 删除运营管理广告
export function delAdvertisement(advertisementId) {
    return request({
        url: '/server/advertisement/' + advertisementId,
        method: 'delete'
    })
}

// 导出运营管理广告
export function exportAdvertisement(query) {
    return request({
        url: '/server/advertisement/export',
        method: 'get',
        params: query
    })
}
